/**
 * 
 */
function checkname(){
	var check = false;
	var person_name=document.getElementById("person_name").value;
	if(person_name==""){
		 document.getElementById("checktext1").innerHTML = "× 姓名不能為空"; 
		 check=false;
	}else{
		 document.getElementById("checktext1").innerHTML = "";  
		 check=true;
	}
	 var submitBtn = document.getElementById("submit");
	 submitBtn.onclick = function (event) {
	  return check;
	};
}
function checkidnu(){
	var check=false;
	var idnu="${identity_number}";
	var identity_number=document.getElementById("identity_number").value;
	if(identity_number==""){
		 document.getElementById("checktext2").innerHTML = "身份證不能為空"; 
		 check=false;
	}else if(identity_number.length!==18){
		 document.getElementById("checktext2").innerHTML = "身份證必須為18位";  
		 check=false;
	}else{
		 document.getElementById("checktext2").innerHTML = "";  
		 check=true;
	}
	 var submitBtn = document.getElementById("submit");
	 submitBtn.onclick = function (event) {
	  return check;
	};
}
function checkbirth(){
	var check=false;
	var birth_time=document.getElementById("birth_time").value;
	var identity_number=document.getElementById("identity_number").value;
	if(birth_time==""){
		 document.getElementById("checktext3").innerHTML = "生日不能為空"; 
		 check=false;
	}else if(!identity_number.contains(birth_time)){
		 document.getElementById("checktext3").innerHTML = "生日必須和身份證匹配";  
		 check=false;
	}else{
		 document.getElementById("checktext3").innerHTML = "";  
		 check=true;
	}
	 var submitBtn = document.getElementById("submit");
	 submitBtn.onclick = function (event) {
	  return check;
	};
}
function checksp(){
	var check=false;
	var matital_status=document.getElementById("matital_status").value
	var spouse_name=document.getElementById("spouse_name").value;
	if(matital_status!=="30"&&matital_status!=="40"&&matital_status!=="90"&&matital_status!=="10"){
		 document.getElementById("checktext4").innerHTML = "請輸入配偶姓名"; 
		 check=false;
	}else{
		 document.getElementById("checktext4").innerHTML = "";  
		 check=true;
	}
	 var submitBtn = document.getElementById("submit");
	 submitBtn.onclick = function (event) {
	  return check;
	};
}